from django.db import models
from .activity import  Activity
class Scheduling(models.Model):
    scheduling_id = models.BigAutoField(primary_key=True, verbose_name='排班 ID')
    start_time = models.TimeField(verbose_name='开始时间')
    end_time = models.TimeField(verbose_name='结束时间')
    personnel_scale = models.IntegerField(verbose_name='人员规模')
    registered_count = models.IntegerField(default=0, verbose_name='已报人数')
    activity_id = models.ForeignKey(Activity, on_delete=models.CASCADE, verbose_name='活动记录')
    class Meta:
        db_table = 'scheduling'
        verbose_name = '排班'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"排班 ID: {self.scheduling_id}"